#include "sgpch.h"
#include "Buffer.h"

#include "Renderer/Renderer.h"
#include "Platform/DirectX/Buffer/DirectX12VertexBuffer.h"

namespace SG
{

	Ref<SG::VertexBuffer> VertexBuffer::Create(float* vertices, uint32_t size)
	{
		switch (Renderer::GetAPI())
		{
		case RendererAPI::API::None:
			SG_CORE_ASSERT(false, "SG engine don't support no graphic api now!");
		case RendererAPI::API::DirectX12: 
			return CreateRef<DirectX12VertexBuffer>();
		}

		SG_CORE_ASSERT(false, "Wrong API!");
		return nullptr;
	}

}